/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.zjor.lwuit.ext.images;

import com.sun.lwuit.Image;
import java.util.Hashtable;

/**
 *
 * @author Serg
 */
public class ImageRegistry {

    private static ImageRegistry instance = new ImageRegistry();

    private Hashtable images = new Hashtable();
    {
        try {
            images.put("img3", Image.createImage("/org/zjor/lwuit/ext/images/img3.png"));
            images.put("img4", Image.createImage("/org/zjor/lwuit/ext/images/img4.png"));
            images.put("img5", Image.createImage("/org/zjor/lwuit/ext/images/img5.png"));
            images.put("img6", Image.createImage("/org/zjor/lwuit/ext/images/img6.png"));
            images.put("img7", Image.createImage("/org/zjor/lwuit/ext/images/img7.png"));
        }catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    public static Image getImage(String name) {
        return (Image)instance.images.get(name);
    }
}
